import React from 'react';
import ReactDOM from 'react-dom';
//import createjs from 'preload-js'
import Main from './Main';





//window.onload = function () {
  ReactDOM.render(<Main/>, document.getElementById("container"));
//}






/*
var manifest;
var preload;

function setupManifest() {
  manifest = [
    {
      src: "./img/1.jpg",
      id: "1"
    }, {
      src: "./img/2.jpg",
      id: "2"
    }, {
      src: "./img/3_0.jpg",
      id: "3.0"
    }, {
      src: "./img/3_1.jpg",
      id: "3.1"
    }, {
      src: "./img/5.jpg",
      id: "5"
    }, {
      src: "./img/7.jpg",
      id: "7"
    }, {
      src: "./img/8.jpg",
      id: "8"
    }

  ];
}

//开始预加载
function startPreload() {
  preload = new createjs.LoadQueue(true);
  //注意加载音频文件需要调用如下代码行
  preload.on("fileload", handleFileLoad);
  preload.on("progress", handleFileProgress);
  preload.on("complete", loadComplete);
  preload.on("error", loadError);
  preload.loadManifest(manifest);

}

//处理单个文件加载
function handleFileLoad(event) {
  console.log("文件类型: " + event.item);
}

function loadError(evt) {
  console.log("加载出错！", evt.text);
}

//已加载完毕进度
function handleFileProgress(event) {
  console.log("已加载 " + (preload.progress * 100 | 0) + " %");
}

//全度资源加载完毕
function loadComplete(event) {
  console.log("已加载完毕全部资源");
}

setupManifest();
startPreload();
*/




